// input::-webkit-outer-spin-button,
// input::-webkit-inner-spin-button {
//   -webkit-appearance: none;
// }

// input[type="number"] {
//   -moz-appearance: textfield;
// }
/* element table head */
.el-popper {
  margin: 0 !important;
}
.el-popper[x-placement^="top"] .popper__arrow::after {
  bottom: 0px;
}
.el-popper[x-placement^="bottom"] .popper__arrow::after {
  top: 0px;
}
.el-popper .popper__arrow::after {
  border-width: 8px;
}

.red {
  color: $error_color !important;
}

.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.divider {
  display: inline-block;
  margin: 0 8px;
  width: 1px;
  height: 16px;
  background: $grey-4;
  vertical-align: -3px;
}

.el-image-viewer__btn {
  color: #fff;
}

.el-table:not(.el-table–scrollable-x) .el-table__fixed-right {
  height: 100% !important;
}

// 重置element样式

// el-scrollbar 隐藏横向滚动条
.el-scrollbar-x-hidden {
  height: 100%;
  &.el-scrollbar .el-scrollbar__wrap {
    overflow-x: hidden;
  }
}

.el-form-item__label {
  color: $grey-9;
}

.el-message-box__btns {
  padding: 6px 15px;
}

.el-button {
  border-radius: 4px;
}

.el-button [class*="el-icon-"] + span {
  margin-left: 4px;
}

.el-button.plain-blue {
  // padding: 8px 20px;
  border-color: $primary_color;
  color: $primary_color;
  background: $white;
  &.is-disabled {
    background: $grey-3 !important;
    color: $grey-7 !important;
    border-color: $grey-4 !important;
  }
  &.primary {
    background: #ecf5ff;
    &:hover {
      background: #46a6ff;
      color: rgba(255, 255, 255, 0.85);
    }
    &:active {
      background: #1682e6;
      color: $white;
    }
  }
}

.el-button.plain-grey,
.el-button--default:not(.el-button--primary) {
  border-color: rgba(0, 0, 0, 0.15);
  color: $grey-8;
  background: $white;
  &.is-disabled {
    background: $grey-3 !important;
    color: $grey-7 !important;
    border-color: $grey-4 !important;
  }
  &.primary {
    border-color: $primary_color;
    color: $primary_color;
    &:hover {
      border-color: #1a78cf;
      color: #1a78cf;
    }
  }
  &:hover {
    border-color: $primary_color;
    color: $primary_color;
  }
  &:active {
    border-color: #1a78cf;
    color: #1a78cf;
  }
}

.el-popover {
  padding: 12px 16px;
  min-width: 0;
  box-sizing: content-box;
}

// 树形
.el-tree-node__content {
  height: 34px;
  padding: 4px 0;
  padding-right: 6px;
}

// drawer
.el-drawer__wrapper {
  .el-drawer__header {
    padding: 16px 24px;
    border-bottom: 1px solid $grey-4;
    margin-bottom: 0px !important;
    span {
      font-size: 16px;
      color: $grey-9;
      line-height: 22px;
    }
  }
  .el-drawer__body {
    // padding: 24px;
    overflow-y: auto;
  }
  .drawer-footer {
    padding: 0 24px;
    text-align: right;
    line-height: 68px;
    height: 68px;
    border-top: 1px solid #e8e8e8;
  }
}
// button间距
.el-button + .el-button {
  margin-left: 16px;
}

.el-button--text + .el-button--text {
  margin-left: 16px;
}

.el-button--text.icon + .el-button--text.icon {
  margin-left: 16px;
}

// form-item
.el-form-item {
  margin-bottom: 12px !important;
  &__label {
    padding: 0;
  }
}
.table-wrap{
  padding: 12px;
}
.el-form--label-top .el-form-item__label {
  padding: 0;
}

// tab标签
.el-tabs__header {
  margin: 0;
  .el-tabs__nav-wrap {
    padding: 0 24px;
    .el-tabs__item {
      height: auto;
      padding: 4px 16px;
      text-shadow: 0 0 0;
    }
    &::after {
      height: 1px;
    }
  }
}

// 查询模块自适应
.elan-search-form {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  .el-form-item {
    margin-bottom: 20px;
    .el-form-item__label {
      height: 32px;
      overflow: hidden;
      text-align: justify;
      &::before {
        content: "：";
        display: inline-block;
        float: right;
      }
      &::after {
        content: "";
        display: inline-block;
        width: 100%;
        height: 0;
        overflow: hidden;
      }
    }
    .el-select,
    .el-date-editor,
    .el-cascader {
      width: 100%;
    }
  }
  .el-row {
    flex-grow: 1;
    display: flex;
    flex-wrap: wrap;
    .flex-end {
      flex: 1;
      margin-bottom: 20px;
    }
  }
  // 依据PC端UI规范，重新定义自适应规则，以下不可更改顺序
  @media only screen and (max-width: 1199px) {
    .el-col-md-12 {
      width: 50%;
    }
  }

  @media only screen and (min-width: 1200px) {
    .el-col-lg-8 {
      width: 33.3333%;
    }
  }

  @media only screen and (min-width: 1680px) {
    .el-col-xl-6 {
      width: 25%;
    }
  }

  @media only screen and (max-width: 1359px) {
    .el-row {
      margin-left: -16px;
      margin-right: -16px;
      .el-col {
        padding-left: 16px;
        padding-right: 16px;
      }
    }
  }

  @media only screen and (min-width: 1360px) {
    .el-row {
      margin-left: -24px;
      margin-right: -24px;
      .el-col {
        padding-left: 24px;
        padding-right: 24px;
      }
    }
  }
}

.el-table {
  th {
    padding: 16px 0;
    background-color: $grey-2 !important; // TODO: 加important防止被覆盖，之后须还原
    color: $grey-8;
    height: 20px;
    line-height: 20px;
    // border: none !important;
    & > .cell {
      padding: 0 12px;
      font-weight: bold;
    }
    &:first-of-type .cell {
      padding-left: 24px;
    }
  }
  td {
    padding: 15px 0 !important;
    color: $grey-8;
    // border: none;
    & > .cell {
      padding: 0 12px;
      // line-height: 40px;
      .el-button {
        padding: 0;
        line-height: 38px;
      }
    }
    &:first-of-type .cell {
      padding-left: 24px;
    }
  }
  .el-table__body tr.el-table__row--striped td {
    background: $table_color;
  }
  .el-table__body tr.hover-row td {
    background: $table_hover_color;
  }
  .el-table__fixed-right {
    th:not(.is-hidden),
    td:not(.is-hidden) {
      .cell {
        padding: 0 24px;
      }
    }
  }
}

// el-card
.el-card {
  border: none;
  &.is-always-shadow {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }
  &__body {
    padding: 24px;
    height: 100%;
  }
}

// 下拉框
.el-select-dropdown.el-popper[x-placement^="bottom"],
.el-cascader__dropdown.el-popper[x-placement^="bottom"] {
  margin-top: 8px !important;
}

.el-cascader-node.is-active,
.el-cascader-node.is-selectable.in-checked-path {
  background-color: #f0f5fe;
}

// 翻页
.el-pagination {
  font-weight: normal !important;
}

/* element table head */
.el-table thead th,
.el-table thead tr {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.85);
  background: #fafafa;
}

.white-card {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.15);
}

.search {
  padding-bottom: 6px;
  margin-bottom: 12px;
}

.pager {
  display: flex;
  justify-content: flex-end;
  margin: 24px 12px 0;
}

.flex-end {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.el-form-item__label {
  padding: 0;
}

.w-e-toolbar {
  border: 1px solid #dcdfe6 !important;
  border-radius: 4px 4px 0 0;
}

.w-e-text-container {
  border: 1px solid #dcdfe6 !important;
  border-top: none !important;
  border-radius: 0 0 4px 4px;
}

.el-menu {
  border-right-width: 0;
}

.el-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.el-input .el-input__count {
  color: $grey-6;
}

.el-input .el-input__inner {
  color: $grey-8;
}

.el-input input::placeholder {
  color: $grey-6;
}

.el-tooltip__popper.is-light {
  padding: 16px;
  margin-bottom: -8px !important;
  border: none !important;
  font-size: 14px;
  color: #000000;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.15);
  max-width: 300px;
  line-height: 28px;
  .popper__arrow {
    border-color: #ffffff transparent transparent transparent !important;
    background: transparent !important;
  }
}

.el-dropdown-menu {
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.15);
}

.el-dialog__header {
  border-bottom: 1px solid $grey-2;
}
